/*
 *  报修相关接口 
 */
import {
  getRequest,
  postRequest
} from '@/utils/axios';

export const RepairApi = {
  /**
   * 获取门户首页报修列表 
   */
  getHomeRepairList: (param) => {
    param = {
      ...param,
      viewid: 'jiekou_menhu_admin_repair_workorder_public_view',
      action: 'getDataForPageToShow'
    }
    return getRequest('/i/system/view.jsp', param);
  },
  /**
   * 08.01获取查询条件字典【不用登录】 
   */
  getPageRef: () => {
    const param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_public_view',
      action: 'service',
      servicename: 'get_zidian_data'
    }
    return getRequest('/i/system/view.jsp', param);
  },
  /**
   * 获取门户首页统计数据 
   */
  getHomeTongjiData: () => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_public_view',
      action: 'service',
      servicename: 'get_tongji_data'
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //报修详情 
  getRepariDetail: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_public_view',
      action: 'service',
      servicename: 'get_gongdanrizhi_data',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //工作台 
  getUserWorkStation: () => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'get_gongzuotai_data'
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //工单中心-分页查询数据 
  getOrders: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'getDataForPageToShow',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //07.01多条件查询-分页查询数据
  getOrdersWidthMore: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'getDataForPageToShow',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //08.02承修单位报修量统计
  getBxCxdwbxltj: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'get_tongji_data_cxdwbxltj',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //08.03维修项目报修量统计
  getBxWxxm: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'get_tongji_data_wxxmbxltj',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //08.04维修区域报修量统计
  getBxWxqy: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'get_tongji_data_wxquyubxltj',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //08.承修单位受理用时
  getBxCxdwYs: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'get_tongji_data_cxdwslys',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //08.06承修单位完工用时
  getBxWgYs: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'get_tongji_data_cxdwwgys',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
  //08.07环比统计
  getBxHB: (p) => {
    let param = {
      viewid: 'jiekou_menhu_admin_repair_workorder_view',
      action: 'service',
      servicename: 'get_tongji_data_huanbi',
      ...p
    }
    return getRequest('/i/system/view.jsp', param);
  },
};